<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns="http://www.w3.org/1999/xhtml" version="2.1">
	<jsp:directive.page contentType="text/html; charset=UTF-8" />
	<jsp:directive.page isELIgnored="false" />
	<jsp:output omit-xml-declaration="false" doctype-root-element="HTML"
		doctype-system="about:legacy-compat" />
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="shortcut icon" href="${pageContext.request.contextPath }/img/favicon.png" />
<title>Ikex</title>

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/estilos.css"
	type="text/css" media="screen" charset="utf-8" />

<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/menuLateral.css"
	type="text/css" media="screen" charset="utf-8" />



<meta name="description" content="" />
<meta name="author" content="Emilio Javier Castillo Gonzalez" />


</head>


<body>
<jsp:useBean id="usuarios"	class="es.ikex.beans.ClienteBean" scope="session" />
<jsp:setProperty name="usuarios" property="where" value="${param.where}"/>
	<c:import url="${pageContext.request.pathInfo}/jsp/menuLateral.jsp" />
	<div id="contenedor">
		<c:import url="${pageContext.request.pathInfo}/jsp/cabecera.jsp" />

		<div id="contenido" style="padding-top: 0px;">
			
			<div id="centro" style="margin-top: 0px;">
				<c:import url="${pageContext.request.pathInfo}/Admin/menuAdmin.jsp" />
				<c:import url="${pageContext.request.pathInfo}/Admin/SuperAdmin/menuSuperAdmin.jsp" />
				<script type="text/javascript">
					var doc = document.getElementById("b");
					doc.setAttribute("class", "menuAdminHover");
				</script>
				<div class="caja left" style="width: 95%; overflow: scroll;" >
				<form action="${pageContext.request.contextPath}/bloquearDesbloquear" method="post">
				<table class="tablaGris">
					<c:forEach items="${usuarios.usuarios }" varStatus="i" var="user" >
					
						<c:if test="${i.index == 0}">
							<tr>
								<td class="sinBorde"></td>
								<td>Usuario</td>
								<td>Ultimo acceso</td>
								<td>Tipo acceso</td>
								<td>Bloqueado</td>
								<td>Nombre</td>
								<td>Apellidos</td>
								<td>Email</td>
								<td>Dni</td>
							</tr>
							
							<tr>
								<td><input checked="checked" type="radio" name="codigo" value="${user.codigo }::${user.bloqueado }" id="u${i.index }" /></td>
								<td><label for="u${i.index }">${user.usuario}</label></td>
								<td><label for="u${i.index }">${user.ultimoAcceso}</label></td>
								<td><label for="u${i.index }">${user.tipoAcceso}</label></td>
								<td><label for="u${i.index }">${user.bloqueado}</label></td>
								<td><label for="u${i.index }">${user.nombre}</label></td>
								<td><label for="u${i.index }">${user.apellidos}</label></td>
								<td><label for="u${i.index }">${user.correo}</label></td>
								<td><label for="u${i.index }">${user.nifNie}</label></td>
						</tr>
						<c:set var="usuario" value="true" />
						</c:if>
						<c:if test="${i.index != 0}">
							<tr>
								<td><input type="radio" name="codigo" value="${user.codigo }::${user.bloqueado }" id="u${i.index }" /></td>
								<td><label for="u${i.index }">${user.usuario}</label></td>
								<td><label for="u${i.index }">${user.ultimoAcceso}</label></td>
								<td><label for="u${i.index }">${user.tipoAcceso}</label></td>
								<td><label for="u${i.index }">${user.bloqueado}</label></td>
								<td><label for="u${i.index }">${user.nombre}</label></td>
								<td><label for="u${i.index }">${user.apellidos}</label></td>
								<td><label for="u${i.index }">${user.correo}</label></td>
								<td><label for="u${i.index }">${user.nifNie}</label></td>
						</tr>
						</c:if>
					
					</c:forEach>
					<c:if test="${usuario == true }">
						<tr>
							<td class="sinBorde"></td>
							<td class="sinBorde"><input type="submit" name="bloquear" value="Bloaquear/Desbloquear" /></td>
							<td class="sinBorde"></td>
							<td class="sinBorde"></td>
							<td class="sinBorde"></td>
							<td class="sinBorde"></td>
							<td class="sinBorde"></td>
							<td class="sinBorde"></td>
							<td class="sinBorde"><input type="submit" name="bloquear" value="Bloaquear/Desbloquear" /></td>
						</tr>
					</c:if>
				</table>
				<c:if test="${usuario != true }">
					<p>No se ha encontrodo ningun usuario con estas caracteristicas.</p> 
				</c:if>
				</form>
				</div>
			</div>

			<div id="der" style="clear: both;"></div>
		</div>
	</div>
	
</body>
</html>
</jsp:root>

